/*     */ package eos.moe.dragoncore;
/*     */ 
/*     */ import java.io.BufferedReader;
/*     */ import java.io.File;
/*     */ import java.io.FileReader;
/*     */ import java.io.IOException;
/*     */ import net.minecraft.client.Minecraft;
/*     */ import net.minecraft.client.renderer.GlStateManager;
/*     */ import net.minecraft.client.renderer.texture.SimpleTexture;
/*     */ import net.minecraft.util.ResourceLocation;
/*     */ import org.lwjgl.opengl.GL11;
/*     */ 
/*     */ public class kz
/*     */ {
/*     */   private boolean m;
/*     */   private boolean l;
/*     */   private boolean t;
/*     */   private boolean d;
/*     */   private boolean z;
/*     */   private SimpleTexture i;
/*     */   private vv w;
/*     */   private final File q;
/*     */   private final String g;
/*     */   
/*     */   public kz(File file) throws IOException {
/*  26 */     this.m = false;
/*  27 */     this.l = false;
/*  28 */     this.t = false;
/*  29 */     this.d = false;
/*  30 */     this.z = true;
/*  31 */     this.q = file.getParentFile();
/*  32 */     String str1 = this.q.getAbsolutePath();
/*  33 */     this.g = str1.substring(str1.indexOf("dragoncore\\") + 9);
/*  34 */     BufferedReader bufferedReader = new BufferedReader(new FileReader(file));
/*  35 */     String str2 = null;
/*  36 */     while ((str2 = bufferedReader.readLine()) != null) {
/*  37 */       String[] arrayOfString = bu.j.split(str2);
/*  38 */       if (arrayOfString[0].equalsIgnoreCase("$texture")) {
/*  39 */         String str = this.g.endsWith("/") ? (this.g + arrayOfString[1]) : (this.g + "/" + arrayOfString[1]);
/*  40 */         ResourceLocation resourceLocation = new ResourceLocation("dragoncore", str);
/*  41 */         Minecraft.func_71410_x().func_110434_K().func_110577_a(resourceLocation);
/*  42 */         this.i = (SimpleTexture)Minecraft.func_71410_x().func_110434_K().func_110581_b(resourceLocation); continue;
/*  43 */       }  if (arrayOfString[0].equalsIgnoreCase("$cubemap")) {
/*  44 */         String str = str1.endsWith("/") ? (str1 + arrayOfString[1]) : (str1 + "/" + arrayOfString[1]);
/*  45 */         ResourceLocation resourceLocation = new ResourceLocation(str);
/*  46 */         this.w = new vv(resourceLocation); continue;
/*  47 */       }  if (arrayOfString[0].equalsIgnoreCase("$nocull")) {
/*  48 */         this.d = Boolean.parseBoolean(arrayOfString[1]); continue;
/*  49 */       }  if (arrayOfString[0].equalsIgnoreCase("$translucent")) {
/*  50 */         this.m = Boolean.parseBoolean(arrayOfString[1]); continue;
/*  51 */       }  if (arrayOfString[0].equalsIgnoreCase("$wireframe")) {
/*  52 */         this.l = Boolean.parseBoolean(arrayOfString[1]); continue;
/*  53 */       }  if (arrayOfString[0].equalsIgnoreCase("$unlit")) {
/*  54 */         this.t = Boolean.parseBoolean(arrayOfString[1]); continue;
/*     */       } 
/*  56 */       if (!arrayOfString[0].equalsIgnoreCase("$depthmask")) {
/*     */         continue;
/*     */       }
/*  59 */       this.z = Boolean.parseBoolean(arrayOfString[1]);
/*     */     } 
/*     */     
/*  62 */     bufferedReader.close();
/*     */   }
/*     */   
/*     */   public void z() {
/*  66 */     GL11.glBindTexture(3553, this.i.func_110552_b());
/*  67 */     if (this.m) {
/*  68 */       zr.i.z(new Object[0]);
/*     */     }
/*  70 */     if (this.l) {
/*  71 */       zr.z.z(new Object[0]);
/*     */     }
/*  73 */     if (this.t) {
/*  74 */       zr.d.z(new Object[0]);
/*     */     }
/*  76 */     if (this.d) {
/*  77 */       zr.w.z(new Object[0]);
/*     */     } else {
/*  79 */       zr.w.v(new Object[0]);
/*     */     } 
/*  81 */     if (!this.z) {
/*  82 */       GlStateManager.func_179132_a(false);
/*     */     }
/*  84 */     if (this.w != null) {
/*  85 */       this.w.start();
/*     */     }
/*     */   }
/*     */   
/*     */   public void v() {
/*  90 */     if (this.m) {
/*  91 */       zr.i.v(new Object[0]);
/*     */     }
/*  93 */     if (this.l) {
/*  94 */       zr.z.v(new Object[0]);
/*     */     }
/*  96 */     if (this.t) {
/*  97 */       zr.d.v(new Object[0]);
/*     */     }
/*  99 */     if (!this.d) {
/* 100 */       zr.w.v(new Object[0]);
/*     */     }
/* 102 */     if (!this.z) {
/* 103 */       GlStateManager.func_179132_a(true);
/*     */     }
/* 105 */     if (this.w != null)
/* 106 */       this.w.end(); 
/*     */   }
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\kz.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */